#include <windows.h>
#include "CMessagePacketTwo.h"


CMessagePacketTwo::CMessagePacketTwo(CChar * schar, CBaseEntity *target, int param1, int param2, int mId) {
	unsigned short targId = 0;
	unsigned int id = 0;
	if ( target != NULL ) {
		targId = target->getTargId();
		id     = target->m_id;
	}
	memset(this->data, 0, 0x0e*2);
	this->type = 0x2d;
	this->size = 0x0e;

	memcpy(this->data,&schar->m_id,4);
	memcpy(this->data+4,&id,4);

	unsigned short scTargId = schar->getTargId();
	memcpy(this->data+0x0c-4,&scTargId,2);
	memcpy(this->data+0x0e-4,&targId,2);

	memcpy(this->data+0x10-4,&param1,4);
	memcpy(this->data+0x14-4,&param2,4);
	memcpy(this->data+0x18-4,&mId,4);

}

CMessagePacketTwo::~CMessagePacketTwo() {

}